//
//  CustomArray.m
//  block
//
//  Created by admin on 2019/8/5.
//  Copyright © 2019 猫爷爷的酱醋茶. All rights reserved.
//

#import "CustomArray.h"

@implementation CustomArray

- (instancetype)init
{
    self = [super init];
    if (self)
    {
        for (int i = 0; i < 10; i++)
        {
            _arr[i] = i*10;
        }
    }
    return self;
}

-(void)TraversingWithBlock:(void (^)(int array))processBlock
{
    for (int i = 0; i < 10; i++)
    {
        //逻辑实现交给外界访问者自己处理
        processBlock(_arr[i]);
    }
}

@end
